﻿using KAsFrame.Common.Dto;
using KAsFrame.Common.Extensions;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace KAsFrame.Domain.Certificate.Dto
{
    public class TemplateDto : IEntityDto<long>
    {
        public long Uid { get; set; }
        public string TempName { get; set; }
        public string Title { get; set; }
        public string ImgBase64 { get; set; }
        public List<string> LabelList
        {
            get
            {
                return Labels.IsNullOrWhiteSpace() ? null : JsonConvert.DeserializeObject<List<string>>(Labels);
            }
        }
        public string Labels { get; set; }
        public string BackgroundColor { get; set; }
        public DateTime? CreateTime { get; set; }
        public DateTime? UpdateTime { get; set; }
    }
}
